<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <meta name="description" content="{$description}">
    <meta name="author" content="sky">
    <link rel="shortcut icon" href="__PUBLIC__/image/logo.png" type="image/png">

    <title>{$title}</title>

    {css href="__PUBLIC__/admin/css/style.css,__PUBLIC__/admin/css/style-responsive.css,__PUBLIC__/css/common.css" /}

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    {js href="__PUBLIC__/admin/js/html5shiv.js,__PUBLIC__/admin/js/respond.min.js" /}
    <![endif]-->
</head>

<body class="login-body">

<div class="container">

    <form class="form-signin" method="post" id="register_form">
        <div class="form-signin-heading text-center">
            <h1 class="sign-title">Registration</h1>
            <img src="__PUBLIC__/image/login-logo.png" />
        </div>


        <div class="login-wrap">
            <p>请填写以下信息</p>
            <input type="text" name="seller_name" placeholder="姓名" class="form-control">
            <input type="text" name="seller_company" placeholder="企业名称(个人可写个体)" class="form-control">
            <input type="text" name="seller_area" placeholder="地区、城市" class="form-control">
            <input type="text" name="seller_address" placeholder="公司地址" class="form-control">
            <input type="text" name="seller_email" placeholder="Email" class="form-control">

            <p> 以下是您的帐号信息</p>
            <div class="input-group" style="margin-bottom: 15px">
                <input type="tel" name="seller_tel" placeholder="手机号(登录帐号)" class="form-control" style="margin-bottom: 0px;">
                <span class="input-group-btn">
                    <button class="btn btn-warning" type="button" style="padding: 8px;">获取验证码</button>
                </span>
            </div>
            <input type="tel" name="smscode" placeholder="验证码" class="form-control">
            <input type="password" name="seller_pass" placeholder="密码" class="form-control">
            <input type="password" name="repeat_pass" placeholder="重复密码" class="form-control">
            <label class="checkbox">
                <input type="radio" checked="1" name="agree" value="1"> 同意并自愿遵守<a onclick="showbook()">拼图云商城协议</a>
            </label>
            <button type="submit" class="btn btn-lg btn-login btn-block">
                <i class="fa fa-check-circle"></i> 注册
            </button>

            <div class="registration">
                已经注册，请
                <a href="{:WebUrl('index/login',array())}" >
                    登录
                </a>
            </div>

        </div>

    </form>
</div>
<!-- Modal -->
<div id="agreebook" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title">拼图云商城协议书</h4>
            </div>
            <div class="modal-body">
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
                <p>1:dfdsfdsfsdfdsfdsfdsf</p>
            </div>
            <div class="modal-footer">
                <button data-dismiss="modal" class="btn btn-primary" type="button">确定</button>
            </div>
        </div>
    </div>
</div>
<!-- modal -->


<!-- Placed js at the end of the document so the pages load faster -->
{js href="__PUBLIC__/admin/js/jquery-1.10.2.min.js,__PUBLIC__/admin/js/bootstrap.min.js,__PUBLIC__/admin/js/modernizr.min.js,__PUBLIC__/admin/js/jquery.nicescroll.js,__PUBLIC__/admin/js/scripts.js" /}
{js href="__PUBLIC__/js/common.js" /}
<!-- Placed js at the end of the document so the pages load faster -->
</body>
<script type="text/javascript">
    function showbook() {
        $('#agreebook').modal('show');
        return;
    }
    $('#register_form').submit(function () {
        var name = $('input[name="seller_name"]').val();
        if(name==''){
            toastTop('姓名不能为空',2);
            return false;
        }
        var company = $('input[name="seller_company"]').val();
        if(company==''){
            toastTop('公司名称不能为空',2);
            return false;
        }
        var email = $('input[name="seller_email"]').val();
        if(!isEmail(email)){
            toastTop('邮箱格式不正确',2);
            return false;
        }

        var tel = $('input[name="seller_tel"]').val();
        if(!isPhone(tel)){
            toastTop('手机格式不正确',2);
            return false;
        }
        var smscode = $('input[name="smscode"]').val();
        if(smscode==''){
            toastTop('短信验证码未填写',2);
            return false;
        }
        var pass = $('input[name="seller_pass"]').val();
        var repeat_pass = $('input[name="repeat_pass"]').val();
        if(pass!=repeat_pass){
            toastTop('两次输入的密码不一致',2);
            return false;
        }
        return false;
    });  
</script>
</html>
